package day015.kebiancanshu;

public class VariableDemo1 {
    public static void main(String[] args) {
        sum();
        sum(1, 2);
        sum(1, 2, 3, 4);
    }

    public static void sum(int... num) {
        int sum = 0;
        for (int i : num) {
            sum += 1;
        }
        System.out.println(sum);
    }
}
